package enums

import "strings"

/**
 *列表种类
 */
type ListTypeLevel int

var ListTypeMap = map[ListTypeLevel]string{V2EX: "V2EX", ZhiHu: "ZhiHu", ZHDaily: "知乎日报",
	WYNews: "网易新闻",WeiXin: "微信公众号", WeiBo: "微博",ChouTi: "抽屉",GuoKr:"果壳",
	JanDan:"煎蛋", Mop:"猫扑", TieBa: "贴吧", DouBan: "DouBan",HuXiu:"虎嗅",A36kr:"36氪",KD:"凯迪",Qdaily:"好奇心日报",
	Baidu:"百度",Jiemian:"界面",TouTiao:"今日头条"}

func GetListLevel(word string) ListTypeLevel {
	if len(word) <= 0 {
		return -1
	}

	var level ListTypeLevel
	for k, v := range ListTypeMap {
		if strings.EqualFold(v, word) {
			level = k
			break;
		}
	}
	return level
}

const (
	V2EX ListTypeLevel = iota
	ZhiHu
	WeiBo
	TieBa
	DouBan
	TianYa
	GitHub
	Baidu
	A36kr
	Qdaily
	GuoKr
	HuXiu
	ZHDaily
	Segmentfault
	WYNews
	WaterAndWood
	HacPai
	KD
	NGA
	WeiXin
	Chiphell
	JanDan
	ChouTi
	ITHome
	Mop
	Jiemian
	TouTiao
)
